-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the ability to have multiple options marked as selected #152
base: master
Are you sure you want to change the base?
Conversation
This way, multi selectes can be realized where the select tag hast the attribute multiple="multiple" together with size="x" and users can ctrl-click multiple options
Thanks for the PR. Can you ensure the commit follows these contributing guidelines, and can you also remove the docstring from the private function? I also think that this might be more flexible if we check for |
Lists and vectors are also considered IFn's, so the are explicitly checked and treated as standard data structures using (some ...).
Hi, I hope, I followed the guidelines better this time. Simply switching |
@@ -74,6 +74,12 @@ | |||
:value value | |||
:checked checked?}])) | |||
|
|||
(defn- selected? [x selected] | |||
(cond (or (list? selected) (vector? selected)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about:
(or (and (sequential? selected) ((set selected) x))
(and (ifn? selected) (selected x))
(= x selected))
Looking for this feature as well. What needs to happen for this to move forward? |
The code needs to be updated as per my previous comment. That's why this issue is marked as "waiting on dev". |
Thanks for the quick reply. Sorry I didn't mean to sound pushy. I understand that's ideally what needs to happen (I did see the tag), but since it's been more than 5 years since you requested the change and more than 2 years from the addition of the tag and the dev hasn't responded, I am wondering what happens to the PR if the dev never responds. Does it stay in limbo forever? I imagine it'd be awkward if someone else agreed with your changes and issued the same PR with those changes. I'm new to Clojure so I'm genuinely curious. |
Someone else can make the same change and submit a PR. In which case I'll merge that PR and close this one. |
This way, multi selectes can be realized where the select tag hast the attribute multiple="multiple"
together with size="x" and users can ctrl-click multiple options